<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="font-awesome-4.5.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/selectize.css">
    <link rel="stylesheet" href="css/selectize.bootstrap3.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/wangEditor.min.css">
    <link rel="stylesheet" href="css/toastr.css">
    <style type="text/css">
    .content .main{margin-left:12%;width:80%;}
    th{text-align:right;}
    .pmtable td{padding-left:30px;}
    </style>
</head>
<body>
<?php 
$nav='admin';
include_once './view/_top.php';
?>
<div class="container-fluid content" id="content">
    <!-- ngView:  --><div ng-view="" class="ng-scope"><div class="container-fluid content ng-scope" id="content">
    <div class="sidebar">
        <ul class="nav nav-sidebar">
            <li id="b" class="active"><a href="?c=admin">所有用户</a></li>
        </ul>
    </div>

    <div class=" main" style="min-width: 600px">
        <div class="main-cont">
            <div class="sub-header" style="margin-bottom: 10px;padding: 0px">
                <h4 style="margin-bottom: 0px;padding-bottom: 20px">添加后台管理用户 </h4></div>
 
            <table class="pmtable" style="min-width: 600px">
                <tbody> 
                <tr>
                    <th>用户名</th>
                    <td><input type="text" id="name" class="form-control" value="" style="width:169px;"></td>
                    <td></td>
                </tr>
                <tr>
                    <th>昵称</th>
                    <td><input type="text" id="nickname" class="form-control" value="" style="width:169px;"></td>
                </tr>
                <tr>
                    <th>密码</th>
                    <td><input type="password" id="password" class="form-control" value="" style="width:169px;"></td>
                </tr>
                 
                
            </tbody></table>
            <div class="hr-line-dashed"></div>
            <div style="width: 600px;text-align: right"><button id="remind" class="btn btn-success" ng-click="PMTsave(PMTcontent)">保存
            </button>
          
            </div>
        </div>
    </div>
    </div>


<div class="modal fade ng-scope" id="mymodal2">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p>是否删除该职位</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button data-toggle="modal" data-target="#mymodal3" type="button" class="btn btn-success" data-dismiss="modal">确定</button>
            </div>
        </div>

    </div>
</div>


</div>
</div>
 
<script src="js/jquery-2.2.4.min.js"></script>
<script src="js/toastr.js"></script>
<script src="js/easing.js"></script>
<script src="js/selectize.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/wangEditor.js"></script>
<script src="js/TileHeadPic.js"></script>
<script src="js/calendar.js"></script>
<script type="text/javascript">
$(function () {

    $('#remind').click(function () {
        toastr.options = {
            closeButton: false,
            debug: false,
            progressBar: false,
            positionClass: "toast-center",
            onclick: null,
            showDuration: "200",
            hideDuration: "1000",
            timeOut: "3000",
            extendedTimeOut: "1000",
            showEasing: "swing",
            hideEasing: "linear",
            showMethod: "fadeIn",
            hideMethod: "fadeOut"
        };
        
        var name=$("#name").val();
        var nickname=$("#nickname").val();
        var pwd=$("#password").val();

        if('' == name){
            var $toast = toastr['info']('请输入用户名', '提示');
            return;
        }

        if('' == nickname){
            var $toast = toastr['info']('请输入昵称', '提示');
            return;
        }

        if('' == pwd){
            var $toast = toastr['info']('请输入密码', '提示');
            return;
        }

        var $toast = toastr['info']('保存成功', '提示');
         
        $.post("?c=admin&a=add", {name:name,nickname:nickname,pwd:pwd}, function(data){
        	window.setTimeout(function(){
            	window.location.href="?c=admin"; 
                }, 1000);
		 }, "json");
        
        
        
    });

})


function Aoo(obj) {
    $("mymodal2").modal("toggle");


}
$(function(){
    $('[data-toggle="tooltip"]').tooltip()
})
</script>
</body></html>